package day240918.lambda.demo01;

public class Test {
    public static void main(String[] args) {
        MyInterface myInterface=()-> {
            System.out.println("lambda实现");
        };

        myInterface.doSomething();
    }


    public static void method2() {
        MyInterface myInterface = new MyInterface() {
            @Override
            public void doSomething() {
                System.out.println("匿名内部类重写方法");
            }
        };

        myInterface.doSomething();
    }

    public static void method1() {
        MyInterface myInterface = new MyInterfaceImpl();
        myInterface.doSomething();
    }


}
